<%-- 
    Document   : purchaseList
    Created on : 08/04/2009, 08:56:54 AM
    Author     : Joel Chuca
--%>

<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="purchasePayment.title"/></title>
    <meta name="heading" content="<fmt:message key='purchasePaymentList.heading'/>"/>
    <meta name="menu" content="RolePurchaser"/>
    <script type="text/javascript">
        window.onload = hide;
        function hide(){
            divInfo=document.getElementById('divInfo').style
            divInfo.display='none';
            hb=document.getElementById('hb').style
            hb.display='none';

        }
    </script>

</head>
<a id="sb" href="" onclick="$('sb').fade(); $('hb').appear(); Effect.SlideDown('divInfo'); return false;" >Mostrar detalles</a>
<br>
<a id="hb" href="" onclick="$('hb').fade(); $('sb').appear(); Effect.SlideUp('divInfo'); return false;" >Ocultar detalles</a>
<div id="divInfo" style="background-color:silver" >
    <s:textfield key="purchase.supplier.fullName" required="true" cssClass="text medium" disabled="true"  maxLength="20"/>
    <table border="0" >
        <tbody>
            <tr>
                <td><s:textfield key="purchase.totalPrice" required="true" cssClass="text medium" disabled="true"/></td>
                <td><s:textfield key="purchase.discount" required="true" cssClass="text medium" disabled="true"/></td>
                <td><s:textfield key="purchase.realPrice" required="true" cssClass="text medium" disabled="true"/></td>
            </tr>
            <tr>
                <td><s:textfield key="purchase.restPrice" required="true" cssClass="text medium" disabled="true"  /></td>
                <td><s:textfield key="purchase.coin.name" required="true" cssClass="text medium" disabled="true"  maxLength="10"/></td>
                <td></td>
            </tr>
        </tbody>
    </table>
</div>
<br><br>
<c:set var="buttons">
    <input type="button" style="margin-right: 5px"
           onclick="location.href='<c:url value="/editPurchasePayment.html"/>'"
           value="<fmt:message key="button.add"/>"/>
    <input type="button" onclick="location.href='<c:url value="/finalizePurchasePayment.html"/>'"
           value="<fmt:message key="button.done"/>"/>
</c:set>
<div style="position:relative; top:20px; left:247px;">
    <s:textfield size="10px" labelposition="left" key="purchase.realPrice" required="true" cssClass="text medium" disabled="true"/>
</div>
<c:out value="${buttons}" escapeXml="false" />
<br><br>
<s:set name="purchasePayments" value="purchasePaymetns" scope="request"/>

<display:table name="purchasePayments"  class="table" id="purchasePaymentsForm" export="true" requestURI="" pagesize="25">
    <display:column titleKey="edit" href="editPurchasePayment.html" paramId="id" paramProperty="id">
        <img src="<c:url value="/images/edit.png" />" alt="Edit" />
    </display:column>
    <display:column property="date" sortable="true" titleKey="purchasePayment.date"/>
    <display:column property="code" sortable="true" titleKey="purchasePayment.code"/>
    <display:column property="amount" sortable="true" titleKey="purchasePayment.amount"/>
    <display:column property="amountLeft" sortable="true" titleKey="purchasePayment.amountLeft"/>

    <display:setProperty name="paging.banner.all_items_found" value=""/>
    <display:setProperty name="paging.banner.some_items_found" value=""/>

</display:table>

<c:out value="${buttons}" escapeXml="false" />

<script type="text/javascript">
        highlightTableRows("purchasePaymentsForm");
</script>